﻿using System;

namespace Domain
{
    internal static class DoubleComparator
    {
        public static bool AreEqual(double x, double y)
        {
            return Math.Abs(x - y) <= Constants.Epsilon;
        }
        public static bool AreEqual(double x, double y, double z)
        {
            var isXYequal = Math.Abs(x - y) <= Constants.Epsilon;
            var isYZequal = Math.Abs(y - z) <= Constants.Epsilon;

            return isXYequal && isYZequal;
        }
    }
}
